package com.wyx.Service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyx.Dao.DishFlavorDao;
import com.wyx.Pojo.DishFlavor;
import com.wyx.Service.DishflavorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DishflavorServiceimpl extends ServiceImpl<DishFlavorDao, DishFlavor> implements DishflavorService {
    @Autowired
    private DishFlavorDao dishFlavorDao;
    @Override
    public List<DishFlavor> getbyDishId(Long id) {
        LambdaQueryWrapper <DishFlavor> wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(DishFlavor::getDishId,id);
        List<DishFlavor> dishFlavors = dishFlavorDao.selectList(wrapper);

        return dishFlavors;
    }
}
